//
//  FindCollectionViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/31.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//


#import "FindCollectionViewCell.h"
#import "UIImageView+WebCache.h"

#define  WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height

@implementation FindCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        [self create];
    }
    return self;
}




- (void)create{
    
    self.image = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [self addSubview:self.image];
    [self.image release];
    
//    self.image.layer.borderWidth = 1;
//    self.image.layer.borderColor = [UIColor whiteColor].CGColor;
//    self.image.layer.cornerRadius = 5;
    self.image.clipsToBounds = YES;
    //    self.imageView.layer.masksToBounds = YES;
}





- (void)setModel:(FindCollectionModel *)model{
    
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    [self.image sd_setImageWithURL:[NSURL URLWithString:self.model.big_image_url] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
    
    
    
}






@end
